<?php
define('YANGJIFANG',true);
require_once "db.php";
$db = new Db();

$sql = 'select * from posts order by id desc';
$rows = $db->getList($sql);

?>
<html>
    <head>
        <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
        <title>阳吉芳的博客</title>
    </head>
    <body>
        <?php foreach($rows as $row) {?>
            <li>
                <a href="/info.php?id=<?php echo $row['id']; ?> "><?php echo $row['title'];?></a>
                <span> <?php echo date('Y-m-d H:i:s',$row['add_time']);?></span>
            </li>
        <?php } ?>
    </body>
</html>

